<template>
  <div class="track-tools">
    <BSceneBtn :active="active === 'ws'" icon="icon-wasichoufang" text="瓦斯" @click="filter('ws')" />
    <BSceneBtn :active="active === 'ddcr'" icon="icon-ddcr" text="断电撤人" @click="filter('ddcr')" />
    <BSceneBtn :active="active === 'tf'" icon="icon-tongfeng" text="通风" @click="filter('tf')" />
    <BSceneBtn :active="active === 'dc'" icon="icon-jiediceliang" text="地测" @click="filter('dc')" />
  </div>
</template>
<script setup lang="ts">
import BSceneBtn from '@/components/b-scene-btn.vue'
import emiter from '@/utils/mitt'
import {defineEmits, ref} from 'vue'

const emit = defineEmits(['changeScene'])
const active = ref('ws')
function filter(type: string) {
  active.value = type
  emit('changeScene', type)
  emiter.emit('changeScene')
}
</script>
<style scoped lang="scss">
.track-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
</style>
